//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
//-----------------------------------------------------------------------------
// <auto-generated>
//   This code was generated by a tool.
//
//   Changes to this file may cause incorrect behavior and will be lost if
//   the code is regenerated.
//
//   For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246
// </auto-generated>
//-----------------------------------------------------------------------------
#pragma once

namespace com { namespace microsoft { namespace Samples { namespace SecureInterface {

// This class, and the associated EventArgs classes, exist for the benefit of JavaScript developers who
// do not have the ability to implement ISecureInterfaceService. Instead, SecureInterfaceServiceEventAdapter
// provides the Interface implementation and exposes a set of compatible events to the developer.
public ref class SecureInterfaceServiceEventAdapter sealed : [Windows::Foundation::Metadata::Default] ISecureInterfaceService
{
public:
    // Method Invocation Events
    event Windows::Foundation::TypedEventHandler<SecureInterfaceServiceEventAdapter^, SecureInterfaceConcatenateCalledEventArgs^>^ ConcatenateCalled 
    { 
        Windows::Foundation::EventRegistrationToken add(Windows::Foundation::TypedEventHandler<SecureInterfaceServiceEventAdapter^, SecureInterfaceConcatenateCalledEventArgs^>^ handler) 
        { 
            return _ConcatenateCalled += ref new Windows::Foundation::EventHandler<Platform::Object^>
            ([handler](Platform::Object^ sender, Platform::Object^ args)
            {
                handler->Invoke(safe_cast<SecureInterfaceServiceEventAdapter^>(sender), safe_cast<SecureInterfaceConcatenateCalledEventArgs^>(args));
            }, Platform::CallbackContext::Same);
        } 
        void remove(Windows::Foundation::EventRegistrationToken token) 
        { 
            _ConcatenateCalled -= token; 
        } 
    internal: 
        void raise(SecureInterfaceServiceEventAdapter^ sender, SecureInterfaceConcatenateCalledEventArgs^ args) 
        { 
            _ConcatenateCalled(sender, args);
        } 
    }

    // Property Read Events
    event Windows::Foundation::TypedEventHandler<SecureInterfaceServiceEventAdapter^, SecureInterfaceGetIsUpperCaseEnabledRequestedEventArgs^>^ GetIsUpperCaseEnabledRequested 
    { 
        Windows::Foundation::EventRegistrationToken add(Windows::Foundation::TypedEventHandler<SecureInterfaceServiceEventAdapter^, SecureInterfaceGetIsUpperCaseEnabledRequestedEventArgs^>^ handler) 
        { 
            return _GetIsUpperCaseEnabledRequested += ref new Windows::Foundation::EventHandler<Platform::Object^>
            ([handler](Platform::Object^ sender, Platform::Object^ args)
            {
                handler->Invoke(safe_cast<SecureInterfaceServiceEventAdapter^>(sender), safe_cast<SecureInterfaceGetIsUpperCaseEnabledRequestedEventArgs^>(args));
            }, Platform::CallbackContext::Same);
        } 
        void remove(Windows::Foundation::EventRegistrationToken token) 
        { 
            _GetIsUpperCaseEnabledRequested -= token; 
        } 
    internal: 
        void raise(SecureInterfaceServiceEventAdapter^ sender, SecureInterfaceGetIsUpperCaseEnabledRequestedEventArgs^ args) 
        { 
            _GetIsUpperCaseEnabledRequested(sender, args);
        } 
    }

    // Property Write Events
    event Windows::Foundation::TypedEventHandler<SecureInterfaceServiceEventAdapter^, SecureInterfaceSetIsUpperCaseEnabledRequestedEventArgs^>^ SetIsUpperCaseEnabledRequested 
    { 
        Windows::Foundation::EventRegistrationToken add(Windows::Foundation::TypedEventHandler<SecureInterfaceServiceEventAdapter^, SecureInterfaceSetIsUpperCaseEnabledRequestedEventArgs^>^ handler) 
        { 
            return _SetIsUpperCaseEnabledRequested += ref new Windows::Foundation::EventHandler<Platform::Object^>
            ([handler](Platform::Object^ sender, Platform::Object^ args)
            {
                handler->Invoke(safe_cast<SecureInterfaceServiceEventAdapter^>(sender), safe_cast<SecureInterfaceSetIsUpperCaseEnabledRequestedEventArgs^>(args));
            }, Platform::CallbackContext::Same);
        } 
        void remove(Windows::Foundation::EventRegistrationToken token) 
        { 
            _SetIsUpperCaseEnabledRequested -= token; 
        } 
    internal: 
        void raise(SecureInterfaceServiceEventAdapter^ sender, SecureInterfaceSetIsUpperCaseEnabledRequestedEventArgs^ args) 
        { 
            _SetIsUpperCaseEnabledRequested(sender, args);
        } 
    }

    // ISecureInterfaceService Implementation
    virtual Windows::Foundation::IAsyncOperation<SecureInterfaceConcatenateResult^>^ ConcatenateAsync(_In_ Windows::Devices::AllJoyn::AllJoynMessageInfo^ info, _In_ Platform::String^ interfaceMemberInStr1, _In_ Platform::String^ interfaceMemberInStr2);

    virtual Windows::Foundation::IAsyncOperation<SecureInterfaceGetIsUpperCaseEnabledResult^>^ GetIsUpperCaseEnabledAsync(_In_ Windows::Devices::AllJoyn::AllJoynMessageInfo^ info);

    virtual Windows::Foundation::IAsyncOperation<SecureInterfaceSetIsUpperCaseEnabledResult^>^ SetIsUpperCaseEnabledAsync(_In_ Windows::Devices::AllJoyn::AllJoynMessageInfo^ info, _In_ bool value);

private:
    event Windows::Foundation::EventHandler<Platform::Object^>^ _ConcatenateCalled;
    event Windows::Foundation::EventHandler<Platform::Object^>^ _GetIsUpperCaseEnabledRequested;
    event Windows::Foundation::EventHandler<Platform::Object^>^ _SetIsUpperCaseEnabledRequested;
};

} } } } 
